-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Pods targets inherit deployment target from the app when higher #23679
Conversation
I noticed a few warnings like: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.0.99. This post install hook makes pods targets that have a deployment target lower than the app target adopt the app deployment target.
# Let Pods targets inherit deployment target from the app | ||
# This solution is suggested here: https://github.com/CocoaPods/CocoaPods/issues/4859 | ||
pod_ios_deployment_target = Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']) | ||
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if pod_ios_deployment_target <= APP_IOS_DEPLOYMENT_TARGET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting that the warning Xcode gives is that the deployment target is set to a version lower than the minimum supported one. An alternative fix would have been to set the target to the minimum supported version. The solution here is more portable, though, because it doesn't require updating the override every time the minimum supported target changes.
Reverted to draft because of the CI failures... |
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I did a worse version of this in #23736 that should carry us through until we're ready to drop CocoaPods entirely. |
I while working on #23678, noticed a few warnings like:
This post install hook makes pods targets that have a deployment target lower than the app target adopt the app deployment target.
Before
After
Regression Notes
PR submission checklist:
RELEASE-NOTES.txt
if necessary. N.A.UI changes testing checklist: Not a UI PR.